#!/bin/bash
sudo chown admin:admin -R /mnt/*
HOSTNAME=$(hostname)
sudo systemctl start rpcbind
sudo mount -t nfs -o vers=3,minorversion=0,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 9a53a490e6-sry93.cn-zhangjiakou.nas.aliyuncs.com:/ /mnt

export HOME=/home/admin
export TMPDIR=/home/admin/tmp

if ! rpm -qa | grep vipserver >/dev/null; then
  sudo  yum install -y  -b current t-midware-vipserver-dnsclient
else
  sudo service vipsrv enable
  sudo service vipsrv restart
fi

if rpm -qa | grep t-oplog-sls >/dev/null; then
  sudo /etc/init.d/ilogtaild stop
  sudo /etc/init.d/ilogtaild start
fi
